package com.fy.tt.dao;

import com.fy.toolhelper.db.IBaseDao;
import com.fy.tt.entity.Script;
import com.fy.tt.entity.Semantic;
import com.fy.tt.entity.Word;
import com.fy.tt.entity.query.ScriptQuery;
import com.fy.tt.entity.vo.ScriptVo;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;


public interface ScriptDao extends IBaseDao<Script> {
    List<ScriptVo> getAllScripts(Connection connection) throws SQLException;

    int getTotalScript(Connection connection, ScriptQuery scriptQuery) throws SQLException;

    int deleteScript(Connection connection, int id) throws SQLException;


    // 分页查询
    List<Script> getPageScripts(Connection connection, int pageSize, int current) throws SQLException;

    // 分页多条件查询
    List<ScriptVo> getConditionPageScripts(Connection connection, ScriptQuery scriptQuery, int pageSize, int current) throws SQLException;

    // 获得剧本对应词汇
    List<Word> getRelatedWord(Connection connection, int scriptId) throws SQLException;

    // 获得相关词汇对应语义
    List<Semantic> getRelatedSemantic(Connection connection, int scriptId) throws SQLException;

}
